﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Chbl.DAL;
using Chbl.Models;

namespace Chbl.Controllers
{
    public class SeasonController : Controller
    {
        private readonly ChblDb _db;

        public SeasonController(ChblDb chblDb)
        {
            _db = chblDb;
        }

        //
        // GET: /Season/
        public ViewResult Index()
        {
            var model = 
                _db.Seasons
                    .OrderBy(s => s.Number);
            return View(model);
        }

    }
}
